<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{admin/common/common}">
<head>
    <title>管理员列表</title>
</head>

<body layout:fragment="content">
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
    首页
    <span class="c-gray en">&gt;</span>系统管理 <span class="c-gray en">&gt;</span>
    管理员列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<form id="myForm" th:action="@{/admin/manager/user}" th:method="get">
    <div class="page-container">
        <div class="text-c">
            日期范围：
            <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'dateMax\')}'})" id="dateMin" class="input-text Wdate" style="width:120px;" name="startTime" th:value="${startTime}" readonly="readonly"/>
            -
            <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'dateMin\')}'})" id="dateMax" class="input-text Wdate" style="width:120px;" name="endTime" th:value="${endTime}" readonly="readonly"/>
            <input type="text" class="input-text" style="width:250px" placeholder="输入管理员名称" name="username" th:value="${username}"/>
            <button type="submit" class="btn btn-success">
                <i class="Hui-iconfont">&#xe665;</i>
                搜用户
            </button>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <!--<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>-->
                <a href="javascript:;" th:onclick="'javascript:admin_add(\'添加管理员\',\'/admin/manager/user/add\',\'800\',\'500\');'" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加管理员</a>
            </span>
            <span class="r">共有数据：<strong th:text="${pageInfo?.total}" id="total">54</strong> 条</span>
        </div>
        <table class="table table-border table-bordered table-bg table-hover">
            <thead>
            <tr>
                <th scope="col" colspan="7">员工列表</th>
            </tr>
            <tr class="text-c">
                <!--<th width="25"><input type="checkbox" name="" value=""/></th>-->
                <th>登录名</th>
                <th>手机</th>
                <th>邮箱</th>
                <th>角色</th>
                <th>加入时间</th>
                <th>是否已启用</th>
                <th width="100">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" th:each="model:${pageInfo?.list}" th:object="${model}">
                <!--<td><input type="checkbox" value="2" name=""/></td>-->
                <td th:text="*{username}">d</td>
                <td th:text="*{mobilePhone}">2</td>
                <td th:text="*{email}">3</td>
                <td th:text="*{roleName}"></td>
                <td th:text="*{#dates.format(createTime, 'yyyy-MM-dd HH:mm')}">2014-6-11 11:11:42</td>
                <td class="td-status">
                    <span class="label radius" th:if="*{isLock}">已停用</span>
                    <span class="label radius label-success" th:unless="*{isLock}">已启用</span>
                </td>
                <td class="td-manage">
                    <a style="text-decoration:none" th:onclick="'javascript:admin_status(this, \'/admin/manager/user/status/'+*{id}+'\',\''+*{!isLock}+'\');'" href="javascript:;" title="启用" th:if="*{isLock}"><i class="Hui-iconfont">&#xe615;</i></a>
                    <a style="text-decoration:none" th:onclick="'javascript:admin_status(this, \'/admin/manager/user/status/'+*{id}+'\',\''+*{!isLock}+'\');'" href="javascript:;" title="禁用" th:unless="*{isLock}"><i class="Hui-iconfont">&#xe631;</i></a>
                    <a title="编辑" href="javascript:;" onclick="admin_edit('管理员编辑','admin-add.html','2','800','500')" th:onclick="'javascript:admin_edit(\'管理员编辑\',\'/admin/manager/user/edit/'+*{id}+'\',\'800\',\'500\');'" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                    <a title="删除" href="javascript:;" onclick="admin_del(this,'1')" th:onclick="'javascript:admin_del(this, \'/admin/manager/user/'+*{id}+'\');'" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                </td>
            </tr>
            </tbody>
        </table>
        <div th:replace="admin/common/page :: page"></div>
    </div>
</form>

<script type="text/javascript" th:src="@{/js/common/page.js}"></script>
<script type="text/javascript" th:src="@{/js/admin/manager/admin-list.js}"></script>
<script th:inline="javascript">

</script>
</body>
</html>